import Vue from "vue";
import Router from "vue-router";
import Login from './Login';
import Major from './Major'
//电脑
import Web from './pages/App';
import Home from './pages/Home';
import Record from "./pages/record/Record";
import Teaching from "./pages/Teaching";
import Clock from "./pages/Clock";
import Statistics from "./pages/Statistics";
import Quarter from './pages/Quarter'
import Calendar from './pages/Calendar'
import User from './pages/permission/User'
import Teacher from './pages/Teacher'
import Feather from './pages/Feather'
import CourseSetting from './pages/CourseSetting'
import Curricula from './pages/curricula/Index'
import Month from './pages/record/Month'
import ChangePwd from './ChangePwd'
import Attendance from './pages/attendance/Index'
import StaCurricula from './pages/sta/curricula/Index'
import Tickler from './pages/tickler/Index'
//手机
import Phone from './phone/App';

Vue.use(Router);

export default new Router({
    mode: "history",
    base: process.env.BASE_URL,
    routes: [
        {
            path: '/',
            redirect: "/major/web/calendar"
        },
        {
            name: 'major',
            path: "/major",
            redirect: '/major/web',
            component: Major,
            children: [
                {
                    path: "web",
                    redirect: '/major/web/home',
                    component: Web,
                    children: [
                        {
                            path: "home",
                            name: "home",
                            component: Home
                        }, {
                            path: "statistics",
                            name: "statistics",
                            component: Statistics
                        }, {
                            path: "teaching",
                            name: "teaching",
                            component: Teaching
                        }, {
                            path: "record",
                            name: "record",
                            component: Record,
                        }, {
                            path: "clock",
                            name: "clock",
                            component: Clock
                        }, {
                            path: "quarter",
                            name: "quarter",
                            component: Quarter
                        }, {
                            path: "calendar",
                            name: "calendar",
                            component: Calendar
                        }, {
                            path: "user",
                            name: "user",
                            component: User
                        }, {
                            path: "teacher",
                            name: "teacher",
                            component: Teacher
                        }, {
                            path: "feather",
                            name: "feather",
                            component: Feather
                        }, {
                            path: "course/setting",
                            name: "course/setting",
                            component: CourseSetting
                        }, {
                            path: "curricula",
                            name: "curricula",
                            component: Curricula
                        }, {
                            path: "record/month",
                            name: "record/month",
                            component: Month
                        }, {
                            path: "attendance",
                            name: "attendance",
                            component: Attendance
                        }, {
                            path: "sta/curricula",
                            name: "sta/curricula",
                            component: StaCurricula
                        }, {
                            path: "tickler",
                            name: "tickler",
                            component: Tickler
                        }
                    ]
                }
            ]
        }, {
            //登录
            path: '/login',
            name: 'login',
            component: Login
        }, {
            //登录
            path: '/change/pwd',
            name: 'change/pwd',
            component: ChangePwd
        }, {
            path: "/phone",
            name: "phone",
            component: Phone,
        }
    ]
});
